<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>代理功能模块</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  #parse('/headFiles.html')
</head>
<body>
<div class="layui-fluid layui-form">
    <input type="hidden" name="userId" value="$!{userId}"/>
    <input type="hidden" name="relationUserId" value="$!{relationUserId}"/>
    <div class="layui-form-item">
        <label class="layui-form-label">功能模块</label>
        <div class="layui-input-block">
            <select name="funcModelId" id="funcModelId" class="layui-hide" lay-ignore></select>
        </div>
    </div>
    <div class="layui-form-item layui-hide">
        <input type="button" lay-submit lay-filter="LAY-form-submit" id="LAY-form-submit" value="确认">
    </div>
</div>
#parse('/footFiles.html')
<script>
layui.config({
  base: '$!{webRoot}/layuiadmin/' //静态资源所在路径
  ,webRoot:'$!{webRoot}'
}).extend({
  index: 'lib/index' //主入口模块
}).use(['index', 'form'], function(){
  var $ = layui.$,form = layui.form;

    $('#funcModelId').select2({
        placeholder: "请选择功能模块",
        width:'100%',
        theme: 'bootstrap',
        ajax: {
            url: layui.setter.webRoot + '/config/func_model/select.data',
            data:{type:'$!{type}'},
            method: 'post',
            delay: 250,
            processResults: function (result) {
                if (result.code == 200) {
                    return {
                        pagination: {more: result.body.more},
                        results: result.body.data || []
                    };
                } else {
                    return {results: []};
                }
            }
        }
    });
})
</script>
</body>
</html>